/**
 * 
 */
package com.gosophia.orgManagement.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.organizationManagement.dto.PositionDTO;
import com.gosophia.organizationManagement.ws.OrganizationManagementWebService;

/**
 * 修改职位排序用action
 * @author wangxinbing,zhaoyan
 * @since  2010-12-31
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
@Controller("UpdatePositionOrderIndexAction")
@Scope("prototype")
public class UpdatePositionOrderIndexAction extends BaseSupportAction {
    private static final long serialVersionUID = 1L;

    @Autowired
    private OrganizationManagementWebService organizationManagementWebService;
    
    private PositionDTO positionDTO;
    private Long toPositionId;
    //下面的posDTO没用了
    private PositionDTO posDTO;
    private List<PositionDTO> positionDTOs;
    public String _execute()throws Exception{
        positionDTOs = organizationManagementWebService.updatePositionOrderIndex(positionDTO.getPositionId(), toPositionId);
        super.getRequestResult().setRsltCode("0");
        return SUCCESS;
    }

    public PositionDTO getPositionDTO() {
        return positionDTO;
    }

    public void setPositionDTO(PositionDTO positionDTO) {
        this.positionDTO = positionDTO;
    }

    public Long getToPositionId() {
        return toPositionId;
    }
    public void setToPositionId(Long toPositionId) {
        this.toPositionId = toPositionId;
    }

    public PositionDTO getPosDTO() {
        return posDTO;
    }

    public void setPosDTO(PositionDTO posDTO) {
        this.posDTO = posDTO;
    }

    public List<PositionDTO> getPositionDTOs() {
        return positionDTOs;
    }

    public void setPositionDTOs(List<PositionDTO> positionDTOs) {
        this.positionDTOs = positionDTOs;
    }
    
    
}
